﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmRegistrarLaboratorio.aspx.cs" Inherits="Farmacia.net.Compras.Laboratorios.frmRegistrarLaboratorio" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style3
        {
            text-align: right;
            width: 118px;
        }
        .style5
        {
            text-align: right;
            font-weight: bold;
            width: 118px;
        }
        .style6
        {
            text-align: left;
        }
        .style7
        {
            width: 128px;
            height: 128px;
        }
        .style8
        {
            text-align: left;
        }
        .style9
        {
            text-align: center;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>Nuevo Laboratorio</legend>

        <asp:FormView ID="fvNuevoLab" runat="server" DataSourceID="odsNuevoLaboratorio" 
            DefaultMode="Insert" HorizontalAlign="Center">
            <EditItemTemplate>
                <table class="style1">
                    <tr>
                        <td rowspan="7">
                            <img alt="Formulario" class="style7" 
                src="../../Images/1340872915_Application.png" />
                        </td>
                        <td>
                            Id:</td>
                        <td width="200">
                            &nbsp;</td>
                        <td colspan="2" rowspan="6" style="width: 400px" width="200">
                            <img alt="Laboratory" class="style7" 
                src="../../Images/1341011278_laboratory.png" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TextBox ID="IdLaboratorioTextBox" runat="server" 
                                Text='<%# Bind("IdLaboratorio") %>' Width="50px" />
                        </td>
                        <td width="200">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            Nombre:</td>
                        <td width="200">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:TextBox ID="NombreTextBox" runat="server" Text='<%# Bind("Nombre") %>' 
                                Width="200px" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Referencia:
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:TextBox ID="ReferenciaTextBox" runat="server" 
                                Text='<%# Bind("Referencia") %>' Width="200px" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                                CommandName="Update" Text="Actualizar" />
                        </td>
                        <td>
                            <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" 
                                CommandName="Cancel" 
                                PostBackUrl="~/Compras/Laboratorio/frmBuscarLaboratorio.aspx" Text="Cancelar" />
                        </td>
                        <td class="style9">
                            <asp:ImageButton ID="Updatebtn" runat="server" CommandName="Update" 
                                ImageUrl="~/Images/1340873474_Save.png" />
                        </td>
                        <td class="style9">
                            <asp:ImageButton ID="cancelbtn" runat="server" CommandName="Cancel" 
                                ImageUrl="~/Images/1340873477_Delete.png" />
                        </td>
                    </tr>
                </table>
            </EditItemTemplate>
            <InsertItemTemplate>
                <table class="style1">
                    <tr>
                        <td class="style3" rowspan="7">
                            <img alt="Formulario" class="style7" 
                src="../../Images/1340872915_Application.png" />
                        </td>
                        <td class="style8">
                            Id :</td>
                        <td width="200">
                            &nbsp;</td>
                        <td colspan="2" rowspan="6" style="width: 400px" width="200">
                            <img alt="Laboratorio" class="style7" 
                src="../../Images/1341011278_laboratory.png" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            <asp:TextBox ID="IdLaboratorioTextBox" runat="server" 
                                Text='<%# Bind("IdLaboratorio") %>' Width="50px" />
                        </td>
                        <td width="200">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style8">
                            Nombre :</td>
                        <td width="200">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style8" colspan="2">
                            <asp:TextBox ID="NombreTextBox" runat="server" Text='<%# Bind("Nombre") %>' 
                                Width="200px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            Referencia :</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style8" colspan="2">
                            <asp:TextBox ID="ReferenciaTextBox" runat="server" 
                                Text='<%# Bind("Referencia") %>' Width="200px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                                CommandName="Insert" Text="Insertar" />
                        </td>
                        <td>
                            <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" 
                                CommandName="Cancel" 
                                PostBackUrl="~/Compras/Laboratorio/frmBuscarLaboratorio.aspx" Text="Cancelar" />
                        </td>
                        <td style="text-align: center">
                            <asp:ImageButton ID="Insertbtn" runat="server" CommandName="Insert" 
                                ImageUrl="~/Images/1340873474_Save.png" />
                        </td>
                        <td style="text-align: center">
                            <asp:ImageButton ID="ImageButton1" runat="server" 
                                ImageUrl="~/Images/1340873477_Delete.png" 
                                PostBackUrl="~/Compras/Laboratorio/frmBuscarLaboratorio.aspx" />
                        </td>
                    </tr>
                </table>
            </InsertItemTemplate>
            <ItemTemplate>
                <table class="style1">
                    <tr>
                        <td class="style5">
                            IdLaboratorio:</td>
                        <td class="style6" width="200">
                            &nbsp;&nbsp;
                            <asp:Label ID="IdLaboratorioLabel" runat="server" 
                                Text='<%# Bind("IdLaboratorio") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td class="style5">
                            Nombre:</td>
                        <td class="style6" width="200">
                            &nbsp;&nbsp;
                            <asp:Label ID="NombreLabel" runat="server" Text='<%# Bind("Nombre") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td class="style5">
                            Referencia:</td>
                        <td class="style6" width="200">
                            &nbsp;&nbsp;
                            <asp:Label ID="ReferenciaLabel" runat="server" 
                                Text='<%# Bind("Referencia") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                                CommandName="Delete" Text="Eliminar" />
                        </td>
                        <td width="100">
                            <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" 
                                CommandName="Cancel" 
                                PostBackUrl="~/Compras/Laboratorio/frmBuscarLaboratorio.aspx" Text="Volver" />
                        </td>
                    </tr>
                </table>

            </ItemTemplate>
        </asp:FormView>    

        <asp:ObjectDataSource ID="odsNuevoLaboratorio" runat="server" 
            DataObjectTypeName="Farmacia.Entities.Laboratorio" 
            DeleteMethod="DeleteLaboratorio" InsertMethod="RegistrarLaboratorio" 
            SelectMethod="GetFromLaboratorioById" 
            TypeName="Farmacia.BussinessLogic.Almacen.Laborat.LaboratorioBL" 
            UpdateMethod="RegistrarLaboratorio" 
            onobjectcreating="odsNuevoLaboratorio_ObjectCreating" 
            ondeleted="odsNuevoLaboratorio_Deleted" 
            oninserted="odsNuevoLaboratorio_Inserted" 
            onupdated="odsNuevoLaboratorio_Updated">
            <DeleteParameters>
                <asp:QueryStringParameter Name="id" QueryStringField="idLaboratorio" 
                    Type="Int32" />
            </DeleteParameters>
            <SelectParameters>
                <asp:QueryStringParameter Name="id" QueryStringField="idLaboratorio" 
                    Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>

    </fieldset>
</asp:Content>
